<template>
  <div>
    {{ msg }}
  </div>
</template>

<script lang='ts' setup>
    import {onMounted,ref,onBeforeUnmount} from 'vue'
    import bus from '@/utils/bus'
    const msg=ref<string>("")
    onMounted(()=>{
        bus.on('send',(arg:any)=>{
            console.log("msg",arg);
            msg.value=arg
        })
    })
    onBeforeUnmount(()=>{
        bus.off("send")
    })
</script>

<style lang='scss' scoped>
</style>